
#函数
def area(width, height):
    return width*height

def print_welcome(name):
    print("welcome", name)
 
print_welcome("Runoob")
w = 4
h = 5
print("width =", w, " height =", h, " area =", area(w, h))


#数据类型
list = [66.25, 333, 333, 1, 1234.5]
print(list)
list.append(444)  #把一个元素添加到列表的结尾
print(list)
list.insert(0,250) #在指定位置添加一个元素
print(list)
i = list.index(333)     #返回元素的位置
print(i)
c = list.count(333)     #返回元素在列表中出现的次数
print(c)
list.remove(333)    #去除元素
print(list)
list.sort()     #排序  从小到大
print(list)
list.reverse()      #倒排
print(list)
list1 = list.copy()     #复制
print(list1)
list1.pop()     #当栈使用，后进先出
print(list1)

from collections import deque

queue = deque(list1)
queue.append(568)
queue.append(789)
print(queue)
queue.popleft()  #先进先出
print(queue)

import sys
print('命令行参数如下')
for i in sys.argv:
    print(i)
print('\n\nPython 路径为：', sys.path, "\n")

from test.test import print_welcome
print_welcome("hbt") 